node + camunda7 rest api
  • 结合点
    • 启动流程的时候传递变量 (单步表单)
    • user task 表单传递变量
      • 和 prisma 结合,相当于存储数据
    • 人员角色等
      • 可以根据 taskDefKey(写死的) 来拿到所有相关的 task
      • 然后可以根据 taskDefKey 关联到角色系统上,通过 claim 或者 assign(区别?) 来指定
      • 但是我记得 camunda 可以指定人的吧

https://www.youtube.com/watch?v=ypX90aQScOQ&t=950s

{
    "links": [
        {
            "method": "GET",
            "href": "http://localhost:8070/engine-rest/deployment/7f578140-0f77-11ee-a5f4-0242ac130002",
            "rel": "self"
        }
    ],
    "id": "7f578140-0f77-11ee-a5f4-0242ac130002",
    "name": null,
    "source": null,
    "deploymentTime": "2023-06-20T14:34:00.703+0000",
    "tenantId": null,
    "deployedProcessDefinitions": {
        "WatchMunster:1:7f5b2ac2-0f77-11ee-a5f4-0242ac130002": {
            "id": "WatchMunster:1:7f5b2ac2-0f77-11ee-a5f4-0242ac130002",
            "key": "WatchMunster",
            "category": "http://bpmn.io/schema/bpmn",
            "description": null,
            "name": null,
            "version": 1,
            "resource": "Munster.bpmn",
            "deploymentId": "7f578140-0f77-11ee-a5f4-0242ac130002",
            "diagram": null,
            "suspended": false,
            "tenantId": null,
            "versionTag": "Watch Munster",
            "historyTimeToLive": null,
            "startableInTasklist": true
        }
    },
    "deployedCaseDefinitions": null,
    "deployedDecisionDefinitions": null,
    "deployedDecisionRequirementsDefinitions": null
}
{
    "links": [
        {
            "method": "GET",
            "href": "http://localhost:8070/engine-rest/process-instance/56ca1393-0f78-11ee-a5f4-0242ac130002",
            "rel": "self"
        }
    ],
    "id": "56ca1393-0f78-11ee-a5f4-0242ac130002",
    "definitionId": "WatchMunster:1:7f5b2ac2-0f77-11ee-a5f4-0242ac130002",
    "businessKey": null,
    "caseInstanceId": null,
    "ended": false,
    "suspended": false,
    "tenantId": null
}
[
    {
        "id": "56cd47e6-0f78-11ee-a5f4-0242ac130002",
        "name": "Pick a team",
        "assignee": null,
        "created": "2023-06-20T14:40:02.000+0000",
        "due": null,
        "followUp": null,
        "lastUpdated": null,
        "delegationState": null,
        "description": null,
        "executionId": "56ca1393-0f78-11ee-a5f4-0242ac130002",
        "owner": null,
        "parentTaskId": null,
        "priority": 50,
        "processDefinitionId": "WatchMunster:1:7f5b2ac2-0f77-11ee-a5f4-0242ac130002",
        "processInstanceId": "56ca1393-0f78-11ee-a5f4-0242ac130002",
        "taskDefinitionKey": "Activity_163f7ot",
        "caseExecutionId": null,
        "caseInstanceId": null,
        "caseDefinitionId": null,
        "suspended": false,
        "formKey": null,
        "camundaFormRef": null,
        "tenantId": null
    }
]
204

history/process-instance?processDefinitionKey=WatchMunster

[
    {
        "id": "56ca1393-0f78-11ee-a5f4-0242ac130002",
        "businessKey": null,
        "processDefinitionId": "WatchMunster:1:7f5b2ac2-0f77-11ee-a5f4-0242ac130002",
        "processDefinitionKey": "WatchMunster",
        "processDefinitionName": null,
        "processDefinitionVersion": 1,
        "startTime": "2023-06-20T14:40:02.000+0000",
        "endTime": "2023-06-20T14:51:27.000+0000",
        "removalTime": null,
        "durationInMillis": 684537,
        "startUserId": null,
        "startActivityId": "StartEvent_1",
        "deleteReason": null,
        "rootProcessInstanceId": "56ca1393-0f78-11ee-a5f4-0242ac130002",
        "superProcessInstanceId": null,
        "superCaseInstanceId": null,
        "caseInstanceId": null,
        "tenantId": null,
        "state": "COMPLETED"
    }
]